import axios from 'axios'
import config from '@/config'

export function invalidateInvoice(data) {
    return axios({
        method: 'post',
        url: config.serverURI + config.api.bill.invalidateInvoice,
        data
    })
}

export function makeInvoice(data) {
    return axios({
        method: 'post',
        url: config.serverURI + config.api.bill.makeInvoice,
        data
    })
}

export function sendInvoice(data) {
    return axios({
        method: 'post',
        url: config.serverURI + config.api.bill.sendInvoice,
        data
    })
}

export function getCleanerBill(data) {
    return axios({
        method: 'post',
        url: config.serverURI + config.api.bill.cleaner,
        data
    })
}

export function checkAccounts(time, data) {
    const url = config.api.bill.checkAccounts + time
    return axios({
        method: 'post',
        url: config.serverURI + url,
        data
    })
}